Properties of the Attribute Element |
|
An attribute represents a field in database table (primary key) or a class. To create a BusObject, define values for the properties described in the following table.
Property |
Description |
---|---|
unique |
Determines whether the attribute is part of the unique identifier for the class. The acceptable values are:
|
type |
Determines the type of the attribute. The acceptable values are: |
Value |
Description |
relation |
Indicates relation to another model. <attribute type="relation"> <name>ORDERIDObject</name> <type occ="1">ORDERHEADER</type> <match> <local type="foreignkey"> <attribute>ORDERID</attribute> </local> <remote type="primarykey"> <attribute>ORDERID</attribute> </remote> </match> </attribute> |
aggregation |
Represents an existing class that has an independent existence. <attribute type="aggregation"> <name>header</name> <layout>nested</layout> <type>Distribution::ORDERHEADER</type> </attribute> |
composition |
Indicates that the attribute holds a class as a component within it. <attribute type="composition"> <name>Father</name> <layout>nested</layout> <type def="class"> <class> <name>Father</name> <type>custom</type> <attributes> <attribute> <name>Name</name> <type>string</type> </attribute> <attribute type="composition"> <name>Son</name> <layout>nested</layout> <type def="class"> <class> <name>Son</name> <type>custom</type> <attributes> <attribute> <name>Name</name> <type>string</type> </attribute> </attributes> </class> </type> </attribute> </attributes> </class> </type> </attribute> |
<name> |
Indicates the name of the attribute |
<java><name> |
Indicates the name that is used to generate the accessor and mutator methods of an attribute.For example, in an attribute which hasCustomerIDas the<name>andCustIDas the<java><name>, the following accessor and mutator methods are generated:
|
<type> |
Represents the data type of the attribute. The acceptable values belong to the following categories:
|
<size> |
Based on the data type, this element indicates the size of the attribute. Use this element only if the data type requires it (for example, string). |
<maxLength> |
Based on the type, it indicates the maximum length of the attribute. |
<minLength> |
Based on the type, it indicates the minimum length of the attribute |
<length> |
Based on the type, it indicates the exact length of the attribute. |
<minInclusive> |
Indicates the lower bound of the value, with the value included. |
<maxExclusive> |
Indicates the upper bound of the value, with the value excluded. |
<derived> |
Indicates the class from which this attribute is derived. |
<scale> |
Indicates the number of digits to the right of the decimal point. |
<precision> |
Indicates the total number of digits used. |
<pattern> |
Indicates the pattern that the attribute must match, based on the type of attribute. |
<initial> |
Indicates the initial value of the attribute. The initial value will be applicable only for validate requests. |
<changeability> |
Indicates the changeability of the attribute. The acceptable values are as follows: |
Value |
Description |
changeable |
Value can be modified at any point of time |
frozen |
Value assigned during creation of the object but cannot be modified subsequently |
add only |
Value can be assigned anytime (during insert or update operation) but only once, and cannot be modified subsequently |
<persistence> |
Determines the mode of persistence. The acceptable values are:
|
<required> |
Indicates the necessity of providing a value for the attribute. The acceptable values are:
|